-- GENERATED SPELL FOR [Cultist Acolyte] --


function spell0_32507(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_32507', 3500, 1)
end

function spell1_32507(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(16568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32507', 3000, 1)
end

function spell2_32507(pUnit, Event) --@Power Word: Fortitude,n/a--
pUnit:FullCastSpellOnTarget(13864,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32507', 603, 1)
end

function Sorts_32507(pUnit, Event)
local choix_sorts_32507 = math.random(0, 2)
if choix_sorts_32507 == 0 then
pUnit:RegisterEvent('spell0_32507', 1, 1)
end
if choix_sorts_32507 == 1 then
pUnit:RegisterEvent('spell1_32507', 1, 1)
end
if choix_sorts_32507 == 2 then
pUnit:RegisterEvent('spell2_32507', 1, 1)
end
end

function mob32507_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32507', math.random(1500, 3000), 1)
end

function mob32507_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32507_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32507_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32507, 1, 'mob32507_Action')
RegisterUnitEvent(32507, 2, 'mob32507_Leave')
RegisterUnitEvent(32507, 3, 'mob32507_Kill')
RegisterUnitEvent(32507, 4, 'mob32507_Die')
